package com.woniuxy.rabbit.controller;

import com.woniuxy.rabbit.service.RabbitService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：yolo
 * @date ：Created in 2025/7/22 10:21
 * @description：
 * @modified By：
 * @version: $
 */
@RestController
@AllArgsConstructor
public class LightController {
    RabbitService rabbitService;

    @PutMapping("/{id}/used")
    public boolean updateUsedStatus(@PathVariable Long id, @RequestParam Integer used) {
        return rabbitService.updateUsedStatus(id, used);
    }
}
